package cn.iocoder.yudao.module.trade.dal.mysql.ordersafetycheckterm;


import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.trade.dal.dataobject.ordersafetycheckterm.OrderSafetyCheckTermDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.trade.controller.admin.ordersafetycheckterm.vo.*;

/**
 * 安检项 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface OrderSafetyCheckTermMapper extends BaseMapperX<OrderSafetyCheckTermDO> {

    default PageResult<OrderSafetyCheckTermDO> selectPage(OrderSafetyCheckTermPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OrderSafetyCheckTermDO>()
                .eqIfPresent(OrderSafetyCheckTermDO::getItemId, reqVO.getItemId())
                .eqIfPresent(OrderSafetyCheckTermDO::getType, reqVO.getType())
                .eqIfPresent(OrderSafetyCheckTermDO::getOptions, reqVO.getOptions())
                .eqIfPresent(OrderSafetyCheckTermDO::getSelected, reqVO.getSelected())
                .eqIfPresent(OrderSafetyCheckTermDO::getObtainEvidence, reqVO.getObtainEvidence())
                .eqIfPresent(OrderSafetyCheckTermDO::getPitfall, reqVO.getPitfall())
                .eqIfPresent(OrderSafetyCheckTermDO::getIsRectify, reqVO.getIsRectify())
                .eqIfPresent(OrderSafetyCheckTermDO::getDefaultContent, reqVO.getDefaultContent())
                .eqIfPresent(OrderSafetyCheckTermDO::getContent, reqVO.getContent())
                .eqIfPresent(OrderSafetyCheckTermDO::getPhotoNum, reqVO.getPhotoNum())
                .betweenIfPresent(OrderSafetyCheckTermDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(OrderSafetyCheckTermDO::getId));
    }

}